<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="baidu-site-verification" content="JdMif0g2tL" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<script src="js/angular.min.js" charset="utf-8"></script>
</head>
<style type="text/css" media="screen">
	*{margin:0;padding: 0;font-size: 16px;outline: none;}
	img{width: 100%;}
</style>
<body ng-app="myApp">

<div ng-controller="main">
	<a href="{{baidu}}" title="去百度了">去百度了</a>
	<a ng-href="{{baidu}}" title="ng去百度了">ng去百度了</a>
	<img src="{{imgsrc}}">
	<img ng-src="{{imgsrc}}">
</div>

<script type="text/javascript">
	var app =angular.module('myApp', []);
	//创建main控制器
	//$timeout是一个服务器定时器服务，$setTimeout是一样的
	app.controller('main', ['$scope','$timeout','$interval', function($scope,$timeout,$interval){
		$scope.baidu='http://www.baidu.com'
		$scope.imgsrc='image/1.jpg'
	}])
</script>
<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
</body>
</html>
<!--应该12angular指令11 src动态绑定-->